package grp.test.dao;

import grp.test.pojo.User;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer userId);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    int checkUsername(String userName);

    User selectLogin(@Param("userName") String userName, @Param("userPassword") String userPassword);

    int updatePasswordByUsername(@Param("userName") String userName, @Param("passwordNew") String passwordNew);

    int checkPassword(@Param(value = "userPassword") String userPassword, @Param("userId") Integer userId);

}